package wiki.xsx.adaptor;

import wiki.xsx.config.Database;
import wiki.xsx.service.DatabaseService;
import wiki.xsx.service.MySQLService;

/**
 * @Descript
 * @Author xsx
 * @Date 2017/11/20
 */
public class DatabaseAdaptor {
    public static DatabaseService getServiceInstance(Database database){
        DatabaseService databaseService = null;
        switch (database.getDbType()){
            case MySQL:
                databaseService = new MySQLService();
                break;
        }
        databaseService.init(database);
        return databaseService;
    }
}
